<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>执法人员库</title>
    <script src="../../../js/header.js"></script>
    <style>
        html,body,body>div{
            overflow: hidden;
        }
        #unitEntrance{
            margin: 0;
            padding: 0;
        }
        .tab-title{
            font-size: 16px;
            font-weight: bold;
            border-left: 4px solid #0D9AFF;
            font-family: PingFangSC-Medium;
            padding-left:10px;
            margin-bottom: 20px;
        }
        .el-input__inner {
            -webkit-appearance: none;
            background-color: #FFF;
            background-image: none;
            border-radius: 4px;
            border: 1px solid #DCDFE6;
            -webkit-box-sizing: border-box;
            box-sizing: border-box;
            color: #606266;
            display: inline-block;
            font-size: inherit;
            height: 30px;
            line-height: 30px;
            outline: 0;
            padding: 0 15px;
            -webkit-transition: border-color .2s cubic-bezier(.645,.045,.355,1);
            transition: border-color .2s cubic-bezier(.645,.045,.355,1);
        }
    </style>
</head>
<body>
<div id="firstpage" style="overflow: hidden;">
    <el-row type="flex" justify="center" style="margin-top: 25px;">
        <el-col :span="15">
            <el-row :gutter="20">
                <el-col >
                    <el-breadcrumb separator-class="el-icon-arrow-right" style="margin-top: 20px;">
                        <el-breadcrumb-item :to="{ path: '/' }"  @click.native="gobackmain()">首页</el-breadcrumb-item>
                        <el-breadcrumb-item :to="{ path: '/' }"  @click.native="gobackzixun">执法人员库</el-breadcrumb-item>
                    </el-breadcrumb>
                    <div class="search-tab">
                        <el-tabs v-model="Title" >
                            <el-form :model="selectForm" :rules="rules" ref="selectForm" label-width="150px">
                            <el-row>
                                <el-col :span="8">
                                    <el-form-item label="姓名:" prop="" label-width="120px">
                                        <el-input v-model="selectForm.executorName" placeholder=""></el-input>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="8">
                                    <el-form-item label="执法人员性质:" prop="" label-width="120px">
                                        <el-select v-model="selectForm.executorCharacter" placeholder="请选择执法人员性质">
                                            <el-option label="公务员" value="1"></el-option>
                                            <el-option label="聘任制公务员" value="2"></el-option>
                                            <el-option label="事业编制工作人员" value="3"></el-option>
                                            <el-option label="企业人员" value="4"></el-option>
                                            <el-option label="执法辅助人员" value="5"></el-option>
                                        </el-select>
                                    </el-form-item>
                                </el-col>
                                <el-col span="8">
                                    <el-form-item label="执法区域:" label-width="120px">
                                        <el-form-item prop="">
                                            <el-input v-model="selectForm.executorArea" placeholder=""></el-input>
                                        </el-form-item>
                                    </el-form-item>
                                </el-col>
                            </el-row>
                            <el-row>
                                <el-col :span="8">
                                    <el-form-item label="执法类别:" prop="" label-width="120px">
                                        <el-input v-model="selectForm.executorCategory" placeholder="" ></el-input>
                                    </el-form-item>
                                </el-col>
                                <div style="float: right;">
                                    <el-button type="primary" size="small" style="width: 60px;height: 30px;" @click="searchForm()">查询</el-button>
                                    <el-button type="warning" size="small" style="width: 60px;height: 30px;" @click="resetForm()">重置</el-button>
                                </div>
                            </el-row>
                        </el-form>
                            <el-table :data="tableData" @selection-change="handleSelectionChange" max-height="500" border style="width: 100%;margin-top: 35px;" :header-cell-style="{background:'#eef1f6',color:'#606266'}">
                                <el-table-column type="selection" ></el-table-column>
                                <el-table-column
                                        prop="executorName"
                                        label="姓名"
                                        width="150"
                                        align="center" >
                                </el-table-column>
                                <el-table-column
                                        prop="executorCharacter"
                                        label="执法人员性质"
                                        width="250"
                                        align="center">
                                    <template scope="scope">
                                        <span v-if="scope.row.executorCharacter==1">公务员</span>
                                        <span v-if="scope.row.executorCharacter==2">聘任制公务员</span>
                                        <span v-if="scope.row.executorCharacter==3">事业编制工作人员</span>
                                        <span v-if="scope.row.executorCharacter==4">企业人员</span>
                                        <span v-if="scope.row.executorCharacter==5">执法辅助人员</span>
                                    </template>
                                </el-table-column>
                                <el-table-column
                                        prop="executorPhoneNum"
                                        label="联系电话"
                                        width="150"
                                        align="center" >
                                </el-table-column>
                                <el-table-column
                                        prop="executorArea"
                                        label="执法区域"
                                        width="150"
                                        align="center" >
                                </el-table-column>
                                <el-table-column
                                        prop="executorCategory"
                                        label="执法类别"
                                        width="150"
                                        align="center" >
                                </el-table-column>
                                <el-table-column
                                        prop="executorCardInDate"
                                        label="证件有效期至"
                                        width="150"
                                        align="center" >
                                </el-table-column>
                                <el-table-column
                                        label="操作"
                                        width=""
                                        align="center">
                                    <template slot-scope="scope">
                                        <el-button type="" size="mini" @click="view(scope.$index,scope.row)">查看</el-button>
                                    </template>
                                </el-table-column>
                            </el-table>
                            <div style="overflow: hidden;">
                                <div class="pagination">
                                    <el-pagination
                                            @size-change="handleSizeChange"
                                            @current-change="handleCurrentChange"
                                            :current-page="currentPage"
                                            :page-sizes="[10]"
                                            :page-size="pagesize"
                                            background
                                            layout="total, sizes,prev, pager, next"
                                            :total="tableTotal"
                                            prev-text="上一页"
                                            next-text="下一页">
                                    </el-pagination>
                                </div>
                            </div>
                            <el-button type="primary" size="mini" @click="appovalExByIds()" style="margin-left: 20px;float: right;">导出</el-button>
                            <el-button type="primary" size="mini" @click="appovalEx()" style="float: right;">批量导出</el-button>


                            <el-dialog title="" :visible.sync="dialogForm" center fullscreen>
                                <el-row type="flex" justify="center" style="margin-top: 15px;">
                                    <el-col :span="15">
                                        <el-form :model="lawperson" :rules="rules" ref="lawperson" label-width="120px">
                                        <!--执法人员信息表-->
                                        <el-row>
                                            <el-col :span="4" class="tab-title">
                                                执法人员信息表
                                            </el-col>
                                        </el-row>
                                        <el-row>
                                            <el-col :span="7">
                                                <el-form-item label="姓名:" prop="executorName">
                                                    <el-input v-model="lawperson.executorName" placeholder="" :disabled="formDisabled"></el-input>
                                                </el-form-item>
                                            </el-col>
                                            <el-col :span="7">
                                                <el-form-item label="性别:" prop="executorSex" >
                                                    <el-select v-model="lawperson.executorSex" placeholder="请选择性别" :disabled="formDisabled">
                                                        <el-option label="未知的性别" value="1"></el-option>
                                                        <el-option label="男" value="2"></el-option>
                                                        <el-option label="女" value="3"></el-option>
                                                        <el-option label="女性改(变)为男性" value="4"></el-option>
                                                        <el-option label="男性改(变)为女性" value="5"></el-option>
                                                        <el-option label="未说明的类别" value="6"></el-option>
                                                    </el-select>
                                                </el-form-item>
                                            </el-col>
                                            <el-col :span="8">
                                                <el-form-item label="出生日期:" prop="executorBirthday" >
                                                    <el-date-picker
                                                            type="date"
                                                            placeholder="选择日期"
                                                            v-model="lawperson.executorBirthday"
                                                            :disabled="formDisabled"
                                                            value-format="yyyy-MM-dd"
                                                            style="width: 100%;">
                                                    </el-date-picker>
                                                </el-form-item>
                                            </el-col>
                                        </el-row>
                                        <el-row>
                                            <el-col span="7">
                                                <el-form-item label="执法证号:" prop="executorCode">
                                                    <el-input v-model="lawperson.executorCode" placeholder="" :disabled="formDisabled"></el-input>
                                                </el-form-item>
                                            </el-col>
                                            <el-col span="15">
                                                <el-form-item label="所属主体(受委托组织)全称:" prop="executorOrganization" >
                                                    <el-input v-model="lawperson.executorOrganization" placeholder="" :disabled="formDisabled"></el-input>
                                                </el-form-item>
                                            </el-col>
                                        </el-row>
                                        <el-row>
                                            <el-col :span="7">
                                                <el-form-item label="联系电话:" prop="executorPhoneNum">
                                                    <el-input v-model="lawperson.executorPhoneNum" placeholder="" :disabled="formDisabled"></el-input>
                                                </el-form-item>
                                            </el-col>
                                            <el-col :span="8">
                                                <el-form-item label="民族:" prop="executorNationality">
                                                    <el-select v-model="lawperson.executorNationality" placeholder="请选择民族" :disabled="formDisabled">
                                                        <el-option
                                                                v-for="item in nationData"
                                                                :key="item.appId"
                                                                :label="item.dictName"
                                                                :value="item.dictName">
                                                        </el-option>
                                                    </el-select>
                                                </el-form-item>
                                            </el-col>
                                            <el-col :span="7">
                                                <el-form-item label="最高学历:" prop="executorEducation" >
                                                    <el-select v-model="lawperson.executorEducation" placeholder="请选择最高学历" :disabled="formDisabled" style="width: 100%;">
                                                        <el-option
                                                                v-for="item in educationData"
                                                                :key="item.appId"
                                                                :label="item.dictName"
                                                                :value="item.dictName">
                                                        </el-option>
                                                    </el-select>
                                                </el-form-item>
                                            </el-col>
                                        </el-row>
                                        <el-row>
                                            <el-col :span="7">
                                                <el-form-item label="政治面貌:" prop="executorPoliticStatus">
                                                    <el-select v-model="lawperson.executorPoliticStatus" placeholder="请选择政治面貌" style="width: 100%;" :disabled="formDisabled">
                                                        <el-option label="中共党员" value="1"></el-option>
                                                        <el-option label="中共预备党员" value="2"></el-option>
                                                        <el-option label="共青团员" value="3"></el-option>
                                                        <el-option label="民革党员" value="4"></el-option>
                                                        <el-option label="民盟盟员" value="5"></el-option>
                                                        <el-option label="民建会员" value="6"></el-option>
                                                        <el-option label="民进会员" value="7"></el-option>
                                                        <el-option label="农工党党员" value="8"></el-option>
                                                        <el-option label="致公党党员" value="9"></el-option>
                                                        <el-option label="九三学社社员" value="10"></el-option>
                                                        <el-option label="台盟盟员" value="11"></el-option>
                                                        <el-option label="无党派人士" value="12"></el-option>
                                                        <el-option label="群众" value="12"></el-option>
                                                    </el-select>
                                                </el-form-item>
                                            </el-col>
                                            <el-col :span="15">
                                                <el-form-item label="身份证号:" prop="executorIdCard">
                                                    <el-input v-model="lawperson.executorIdCard" placeholder="" :disabled="formDisabled"></el-input>
                                                </el-form-item>
                                            </el-col>
                                        </el-row>
                                        <el-row>
                                            <el-col :span="7">
                                                <el-form-item label="职级:" prop="executorLevel">
                                                    <el-select v-model="lawperson.executorLevel" placeholder="请选择职级" style="width: 100%;" :disabled="formDisabled">
                                                        <el-option label="省部级正职" value="1"></el-option>
                                                        <el-option label="省部级副职" value="2"></el-option>
                                                        <el-option label="厅局级正职（巡视员）" value="3"></el-option>
                                                        <el-option label="厅局级副职（副巡视员）" value="4"></el-option>
                                                        <el-option label="县处级正职（调研员）" value="5"></el-option>
                                                        <el-option label="县处级副职（副调研员）" value="6"></el-option>
                                                        <el-option label="乡科级正职（主任科员）" value="7"></el-option>
                                                        <el-option label="乡科级副职（副主任科员）" value="8"></el-option>
                                                        <el-option label="科员" value="9"></el-option>
                                                        <el-option label="办事员" value="10"></el-option>
                                                        <el-option label="其他" value="11"></el-option>
                                                    </el-select>
                                                </el-form-item>
                                            </el-col>
                                            <el-col :span="8">
                                                <el-form-item label="是否监督人员:" prop="executorSuperviseStatus" >
                                                    <!--<el-select v-model="lawperson.executorSuperviseStatus" placeholder="请选择是否监督人员" :disabled="formDisabled">
                                                        <el-option label="是" value="1"></el-option>
                                                        <el-option label="否" value="2"></el-option>
                                                    </el-select>-->
                                                    <el-radio-group v-model="lawperson.executorSuperviseStatus"  :disabled="formDisabled">
                                                        <el-radio label="1">是</el-radio>
                                                        <el-radio label="2">否</el-radio>
                                                    </el-radio-group>
                                                </el-form-item>
                                            </el-col>
                                            <el-col :span="8">
                                                <el-form-item label="是否具有法律职业资格:" prop="executorLegalQualification">
                                                    <!--<el-select v-model="lawperson.executorLegalQualification" placeholder="请选择是否具有法律职业资格" :disabled="formDisabled">
                                                        <el-option label="是" value="1"></el-option>
                                                        <el-option label="否" value="2"></el-option>
                                                    </el-select>-->
                                                    <el-radio-group v-model="lawperson.executorLegalQualification"  :disabled="formDisabled">
                                                        <el-radio label="1">是</el-radio>
                                                        <el-radio label="2">否</el-radio>
                                                    </el-radio-group>
                                                </el-form-item>
                                            </el-col>
                                        </el-row>
                                        <el-row>
                                            <el-col :span="7">
                                                <el-form-item label="执法人员性质:" prop="executorCharacter">
                                                    <el-select v-model="lawperson.executorCharacter" placeholder="请选择执法人员性质" style="width: 100%;" :disabled="formDisabled">
                                                        <el-option label="公务员" value="1"></el-option>
                                                        <el-option label="聘任制公务员" value="2"></el-option>
                                                        <el-option label="事业编制工作人员" value="3"></el-option>
                                                        <el-option label="企业人员" value="4"></el-option>
                                                        <el-option label="执法辅助人员" value="5"></el-option>
                                                    </el-select>
                                                </el-form-item>
                                            </el-col>
                                            <el-col :span="8">
                                                <el-form-item label="发证机关:" prop="executorCertifyingAuthority" >
                                                    <el-input v-model="lawperson.executorCertifyingAuthority" placeholder="请输入执法人员执法证的发证机关名称" :disabled="formDisabled"></el-input>
                                                </el-form-item>
                                            </el-col>
                                            <el-col :span="8">
                                                <el-form-item label="学历专业:" prop="executorMajor" >
                                                    <el-input v-model="lawperson.executorMajor" placeholder="请输入执法人员的学历专业，如法律等" :disabled="formDisabled"></el-input>
                                                </el-form-item>
                                            </el-col>
                                        </el-row>
                                        <el-row>
                                            <el-col :span="24">
                                                <el-form-item label="执法区域:" v-model="lawperson.executorArea" prop="executorArea">
                                                    <el-col :span="4">
                                                        <el-form-item prop="checkprovinceValue">
                                                            <el-select v-model="checkprovinceValue" placeholder="请选择省" @change="chooseProvince" :disabled="formDisabled">
                                                                <el-option
                                                                        v-for="item in provinceData"
                                                                        :key="item.code"
                                                                        :label="item.name"
                                                                        :value="item.name">
                                                                </el-option>
                                                            </el-select>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col span="0.5" style="color: rgb(192, 204, 218);text-align: center;">
                                                        <span>—</span>
                                                    </el-col>
                                                    <el-col :span="4">
                                                        <el-form-item prop="checkcityValue">
                                                            <el-select v-model="checkcityValue" placeholder="请选择市" @change="chooseCity" :disabled="formDisabled">
                                                                <el-option
                                                                        v-for="item in cityData"
                                                                        :key="item.code"
                                                                        :label="item.name"
                                                                        :value="item.name">
                                                                </el-option>
                                                            </el-select>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col span="0.5" style="color: rgb(192, 204, 218);text-align: center;">
                                                        <span>—</span>
                                                    </el-col>
                                                    <el-col :span="4">
                                                        <el-form-item prop="checkareaValue">
                                                            <el-select v-model="checkareaValue" @change="chooseArea" placeholder="请选择区、县" :disabled="formDisabled">
                                                                <el-option
                                                                        v-for="item in areaData"
                                                                        :key="item.code"
                                                                        :label="item.name"
                                                                        :value="item.name">
                                                                </el-option>
                                                            </el-select>
                                                        </el-form-item>
                                                    </el-col>
                                                    <el-col span="0.5" style="color: rgb(192, 204, 218);text-align: center;">
                                                        <span>—</span>
                                                    </el-col>
                                                    <el-col :span="7">
                                                        <el-form-item>
                                                            <el-input v-model="checkdetailAddress" placeholder="填写详细地址" :disabled="formDisabled"></el-input>
                                                        </el-form-item>
                                                    </el-col>

                                                </el-form-item>
                                            </el-col>

                                        </el-row>
                                        <el-row>
                                            <el-col :span="8">
                                                <el-form-item label="证件有效期至:" prop="executorCardInDate">
                                                    <!--<el-input v-model="lawperson.executorCardInDate" placeholder="请输入执法人员的执法证有效期" :disabled="formDisabled"></el-input>-->
                                                    <el-date-picker
                                                            v-model="lawperson.executorCardInDate"
                                                            type="date"
                                                            style="width: 100%;"
                                                            value-format="yyyy-MM-dd"
                                                            placeholder="请选择执法人员的执法证有效期至"
                                                            :disabled="formDisabled"
                                                            >
                                                    </el-date-picker>
                                                </el-form-item>
                                            </el-col>
                                            <el-col :span="8">
                                                <el-form-item label="执法类别:" prop="executorCategory" >
                                                    <el-input v-model="lawperson.executorCategory" placeholder="" :disabled="formDisabled"></el-input>
                                                </el-form-item>
                                            </el-col>
                                            <el-col :span="8">
                                                <el-form-item label="所属机构:" prop="executorLocation" >
                                                    <el-select v-model="lawperson.executorLocation" placeholder="请选择所属机构" :disabled="formDisabled" style="width: 100%;">
                                                        <el-option
                                                                v-for="item in orgData"
                                                                :key="item.appId"
                                                                :label="item.dictName"
                                                                :value="item.dictName">
                                                        </el-option>
                                                    </el-select>
                                                </el-form-item>
                                            </el-col>
                                        </el-row>
                                        <el-row>
                                            <el-col :span="22">
                                                <div style="float:right;">
                                                    <el-button type="info" size="small" style="width: 60px;height: 30px;" @click="dialogForm = false;clearForm()">取消</el-button>
                                                </div>
                                            </el-col>
                                        </el-row>
                                    </el-form>
                                    </el-col>
                                </el-row>
                            </el-dialog>
                        </el-tabs>
                    </div>
                </el-col>
            </el-row>
        </el-col>
    </el-row>
</div>
</body>
<script>
    var firstpage = new Vue({
        el: '#firstpage',
        data() {
            return {

                dialogForm: false,
                currentPage: 1, //默认显示页面为1
                pagesize: 10, // 每页的数据条数
                tableTotal:'',

                formDisabled: false,
                currentRow: null,
                tableData: [],
                lawperson: {
                    id: '',// 表单id
                    executorName: '',
                    executorSex: '',
                    executorCode: '',
                    executorBirthday: '',
                    executorPoliticStatus: '',
                    executorLevel: '',
                    executorOrganization: '',
                    executorNationality: '',
                    executorEducation: '',
                    executorPhoneNum: '',
                    executorSuperviseStatus: 1,
                    executorIdCard: '',
                    executorLegalQualification: 1,
                    executorCharacter: '',
                    executorMajor: '',
                    executorCertifyingAuthority: '',
                    executorArea: '',
                    executorCategory: '',
                    executorCardInDate: '',
                    executorLocation:''
                },
                selectForm: {
                    executorName: '',
                    executorCharacter : '',
                    executorArea : '',
                    executorCategory : '',
                    executorCode: '',
                    executorOrganization: '',
                    executorLevel: '',
                    executorEducation: ''
                },
                Form: {
                    executorName: '',
                    executorCharacter : '',
                    executorArea : '',
                    executorCategory : '',
                    executorCode: '',
                    executorOrganization: '',
                    executorLevel: '',
                    executorEducation: ''
                },
                checkprovinceValue:'',
                checkcityValue:'',
                checkareaValue:'',
                checkdetailAddress: '',
                exportList : []
            }
        },
        created(){

        },
        mounted(){
            this.getData();
        },
        methods: {
            getData() {
                var pagesize = this.pagesize;
                var pageno = this.currentPage;

                axios({
                    method: 'get',
                    url: '/dzjportal/ApExecutorInfo/getSelectInfo',
                    params: {
                        pageSize: pagesize,
                        pageNo: pageno,
                        executorName: this.Form.executorName,
                        executorCharacter: this.Form.executorCharacter,
                        executorArea: this.Form.executorArea,
                        executorCategory: this.Form.executorCategory
                    }
                })
                    .then(response => {
                        let data = response.data;
                        if (data.code == 200) {
                            let dataInformation = data.data.results;
                            this.tableTotal = data.data.total;// 数据长度

                            this.tableData = dataInformation;
                        } else {
                            this.$message.error(data.msg);
                        }
                    })
                    .catch(function (error) {
                        console.log(error);
                    });
            },
            /* 列表页搜索 */
            searchForm() {
                this.currentPage = 1;
                var pagesize = this.pagesize;
                var pageno = 1;
                this.Form=  JSON.parse(JSON.stringify(this.selectForm));
                axios({
                    method: 'get',
                    url: '/dzjportal/ApExecutorInfo/getSelectInfo',
                    params: {
                        pageSize: pagesize,
                        pageNo: pageno,
                        executorName: this.Form.executorName,
                        executorCharacter: this.Form.executorCharacter,
                        executorArea: this.Form.executorArea,
                        executorCategory: this.Form.executorCategory
                    }
                })
                    .then(response => {
                        let data = response.data;
                        if (data.code == 200) {
                            let dataInformation = data.data.results;
                            this.tableTotal = data.data.total;// 数据长度

                            this.tableData = dataInformation;
                        } else {
                            this.$message.error(data.msg);
                        }
                    })
                    .catch(function (error) {
                        console.log(error);
                    });
            },
            /* 列表页重置 */
            resetForm(formName) {
                this.selectForm.executorName = '';
                this.selectForm.executorCode = '';
                this.selectForm.executorOrganization = '';
                this.selectForm.executorLevel = '';
                this.selectForm.executorCharacter = '';
                this.selectForm.executorEducation = '';
                this.selectForm.executorArea = '';
                this.selectForm.executorCategory = '';
                this.Form.executorName = '';
                this.Form.executorCode = '';
                this.Form.executorOrganization = '';
                this.Form.executorLevel = '';
                this.Form.executorCharacter = '';
                this.Form.executorEducation = '';
                this.Form.executorArea = '';
                this.Form.executorCategory = '';
                this.currentPage = 1;
                this.getData();
            },
            clearForm(){
                this.lawperson.executorName = '';
                this.lawperson.executorSex = '';
                this.lawperson.executorCode = '';
                this.lawperson.executorOrganization = '';
                this.lawperson.executorPhoneNum = '';
                this.lawperson.executorIdCard = '';
                this.lawperson.executorLevel = '';
                this.lawperson.executorBirthday = '';
                this.lawperson.executorPoliticStatus = '';
                this.lawperson.executorNationality = '';
                this.lawperson.executorEducation = '';
                this.lawperson.executorSuperviseStatus = 1;
                this.lawperson.executorLegalQualification = 1;
                this.lawperson.executorCharacter = '';
                this.lawperson.executorMajor = '';
                this.lawperson.executorCertifyingAuthority = '';
                this.lawperson.executorArea = '';
                this.lawperson.executorCategory = '';
                this.lawperson.executorCardInDate = '';
                this.lawperson.executorLocation = '';

                this.checkprovinceValue = '';
                this.checkcityValue = '';
                this.checkareaValue = '';
                this.checkdetailAddress = '';
            },
            // 查看
            view(index,row){
                this.dialogForm = true;
                var arr = row.executorArea.split("-");
                this.checkprovinceValue = arr[0];
                this.checkcityValue = arr[1];
                this.checkareaValue = arr[2];
                this.checkdetailAddress = arr[3];

                this.lawperson = row;
                // 执法人员身份证号加密
                if(this.lawperson.executorIdCard != "") {
                    this.lawperson.executorIdCard = enctryptIdcard(this.lawperson.executorIdCard);
                }
                // 执法证号加密
                if(this.lawperson.executorCode != "") {
                    this.lawperson.executorCode = enctryptIdcard(this.lawperson.executorCode);
                }
                // this.showInformation(index,row);
                this.checkDisabled(true);
            },
            gobackmain(){
                parent.mainwork.backIndex();
            },
            // 设置允许填写和不允许填写
            checkDisabled(n) {
                if (n) {
                    this.formDisabled = true;
                } else {
                    this.formDisabled = false;
                }
            },
            /* 单选搜索表单 */
            selectCurrentChange(val){
                this.currentRow = val;
            },
            //每页下拉显示数据
            handleSizeChange(size) {
                this.pagesize = size;
                this.getData();
            },
            //点击第几页
            handleCurrentChange(currentPage) {
                this.currentPage = currentPage;
                this.getData();
            },
            // 公共方法--查看
            showInformation(index,row){
                console.log(row);

                axios({
                    method: 'get',
                    url: '/dzjportal/ApExecutorInfo/selectOne',
                    params: {
                        executorid: row.id
                    }
                })
                    .then(response => {
                        let data = response.data;
                        if (data.code == 200) {
                            let rowdata = response.data.data;
                            this.clearForm(); // 重置
                            var arr = rowdata.executorArea.split("-");
                            this.checkprovinceValue = arr[0];
                            this.checkcityValue = arr[1];
                            this.checkareaValue = arr[2];
                            this.checkdetailAddress = arr[3];

                            this.lawperson = rowdata;
                            // 执法人员身份证号加密
                            if(this.lawperson.executorIdCard != "") {
                                this.lawperson.executorIdCard = enctryptIdcard(this.lawperson.executorIdCard);
                            }

                        } else {
                            this.$message.error(data.msg);
                        }
                    })
                    .catch(function (error) {
                        console.log(error);
                    });
            },
            //批量导出
            appovalEx(){
                this.$confirm('确定要批量导出吗?', '提示', {
                    cancelButtonText: '取消',
                    confirmButtonText: '确定',
                    type: 'warning'
                }).then(() => {
                    window.location.href="/dzjportal/ApExecutorInfo/export?executorName="+this.selectForm.executorName+"&executorCharacter="
                        +this.selectForm.executorCharacter+"&executorArea="
                        +this.selectForm.executorArea+"&executorCategory="
                        +this.selectForm.executorCategory;
                }).catch(() => {
                    this.$message({
                        type: 'info',
                        message: '取消导出'
                    });
                });
            },
            handleSelectionChange(val) {
                this.exportList = val;
            },
            //导出
            appovalExByIds(){
                if(this.exportList.length >0){
                    this.ids = this.exportList.map(function(exportList,index){
                        return exportList.id;
                    }).join(",");
                    this.$confirm('确定要导出所选数据吗?', '提示', {
                        cancelButtonText: '取消',
                        confirmButtonText: '确定',
                        type: 'warning'
                    }).then(() => {
                        window.location.href="/dzjportal/ApExecutorInfo/exportByIds?ids="+this.ids
                    }).catch(() => {
                        this.$message({
                            type: 'info',
                            message: '取消导出'
                        });
                    });
                }else {
                    this.$message('请选择要导出的数据！');
                }
            }
        }
    })
</script>
</html>